import $http from '@/common/api/request'

// 查询外调车辆车企名称
export function pageHistoryOutwardAutoCompany(data) {
  return $http.get('/order/portal/order/outwardAutoCompany/history/page', data)
}

// 车企创建内部订单(多个车辆信息)
export function addInternalJson(data) {
  return $http.post('/order/order/addInternalJson', data, {
    header: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

// 获取虚拟号码
export function getPhone(orderId) {
  return $http.get('/order/order/getTouristGuidePhone/' + orderId)
}

// 取消订单
export function cancelOrder(data) {
  return $http.post('/order/order/cancel', data)
}

// 转单
export function modifyOrderVehicle(data) {
  return $http.post('/order/order/vehicle/modification', data, {
    header: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

// 获取订单详情
export function getOrderDetail(orderId, data) {
  return $http.get('/order/order/forAll/' + orderId, data)
}

// 修改订单:车企端
export function updateOrderAll(data) {
  return $http.post('/order/portal/order/updateOrder', data, {
    header: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

// 修改订单备注
export function updateOrderRemark(data) {
  return $http.post('/order/portal/order/remark', data, {
    header: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

// 查询订单费用明细详情
export function pageExpenditureBalanceDetail(data) {
  return $http.get('/user/dailyExpenditureBalance/getById', data)
}

// 删除内部订单:车企端
export function delOrder(data) {
  return $http.post('/order/portal/order/delOrder', data)
}
